package com.mspbots.usermanage.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * describe：
 *
 * @author: chay.pan
 * @create-date: 2019-11-22
 */
@RestController
@RequestMapping("department")
public class TenantDepartmentController {

/*    @GetMapping("/username/page")
    public Callable selectUserNamePage(Page<TenantDepartmentDto> page, TenantDepartmentDto queryParams) {
        return () -> service.selectUserNamePage(page, queryParams);
    }

    @PostMapping("/user")
    public Callable insertTenantDepartmentUser(TenantDepartment tenantDepartment,String email) {
        return () -> service.insertTenantDepartmentUser(tenantDepartment, email);
    }

    @DeleteMapping("/delete")
    public Callable deleteTenantDepartmentUser(TenantDepartment tenantDepartment) {
        tenantDepartment.setUstate(1);
        return () -> service.updateById(tenantDepartment);
    }

    @GetMapping("/one")
    public Callable getTenantDepartmentUser(TenantDepartment tenantDepartment) {
        tenantDepartment.setUstate(0);
        return () -> service.getOne(new QueryWrapper<>(tenantDepartment));
    }
    @GetMapping("/tenantId")
    public Callable getTenantDepartments(TenantDepartment tenantDepartment) {
        tenantDepartment.setUstate(0);
        return () -> service.list(Wrappers.<TenantDepartment>lambdaQuery().eq(TenantDepartment::getTenantId,tenantDepartment.getTenantId()));
    }*/
}
